package file

import (
	"encoding/binary"

	"time"
)

var sentinel = []byte("000111000111")

var zeroBh BlockHeader
var zeroDp Data
var zeroTime time.Time

var bhSize = int32(binary.Size(zeroBh))
var dpSize = int32(binary.Size(zeroDp))
var sentinelSize = int32(len(sentinel))

// Data defines the layout of a timeseries value on disk.
type Data struct {
	Value float64
	Ts    int64
}

// TODO(jwall): Maybe we should be using trailers instead of headers?
// BlockHeader defines the layout of the header of a block of timeseries
// values on disk.
type BlockHeader struct {
	Start int64
	Span  time.Duration
	Size  int32
}
